package com.bbcare.oms.plat.store.ibatis;

import com.bbcare.oms.plat.entity.Auth;
import java.util.List;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

@CacheNamespace(readWrite=true)
public abstract interface IAuthDAO
{
  @Select({"select * from au_auth where id=#{id}"})
  public abstract Auth select(String paramString)
    throws Exception;

  @Select({"select * from au_auth where FIND_IN_SET(#{roleId},role_id) and parent_id is null and type='nav'"})
  @Results({@org.apache.ibatis.annotations.Result(property="resource.id", column="resource_version_id")})
  public abstract List<Auth> getNavbarAuthByRole(String paramString)
    throws Exception;

  //@Select({"select * from au_auth where parent_id=#{parentId} and type='nav'"})
  //@Results({@org.apache.ibatis.annotations.Result(property="resource.id", column="resource_version_id")})
  //public abstract List<Auth> getNavbarAuthByParent(String paramString)
  //  throws Exception;

  @Select({"select * from au_auth where parent_id=#{id} and FIND_IN_SET(#{roleId},role_id) and type='nav'"})
  @Results({@org.apache.ibatis.annotations.Result(property="resource.id", column="resource_version_id")})
  public abstract List<Auth> getNavbarAuthByParent(@Param("id") String id, @Param("roleId") String roleId) throws Exception;
}


/* Location:              C:\Users\ZCL\Desktop\oms\oms\oms\WEB-INF\classes\com.zip!\com\bbcare\oms\plat\store\ibatis\IAuthDAO.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */
